package com.alibaba.excel.write.metadata.holder;

import com.alibaba.excel.metadata.ConfigurationHolder;
import com.alibaba.excel.write.property.ExcelWriteHeadProperty;

/**
 * 获取对应的 Holder
 * Get the corresponding Holder
 **/
public interface WriteHolder extends ConfigurationHolder {

    /**
     * 当前操作的单元格需要执行什么 'Excel 写入头属性'
     * What 'ExcelWriteHeadProperty' does the currently operated cell need to execute
     */
    ExcelWriteHeadProperty excelWriteHeadProperty();

    /**
     * 是判断一个字段是否需要忽略
     */
    boolean ignore(String fieldName, Integer columnIndex);

    /**
     * 当前操作的 cell 是否需要header
     */
    boolean needHead();

    /**
     * 是否需要自动合并表头。
     */
    boolean automaticMergeHead();

    /**
     * 头部开始的索引
     * 相对于工作表的现有内容写入头部。索引是从零开始的。
     * Writes the head relative to the existing contents of the sheet. Indexes are zero-based.
     *
     * @return
     */
    int relativeHeadRowIndex();
}
